package com.xiyue.server.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sport.model.entity.SysRole;
import com.sport.model.vo.RoleAuthVo;
import com.xiyue.server.mapper.SysRoleMapper;
import com.xiyue.server.service.SysRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Override
    public List<String> getPermissions(String roleId) {
        return baseMapper.getPermissions(roleId);
    }

    @Override
    public Boolean check(RoleAuthVo roleAuthVo) {
        baseMapper.deleteCheck(roleAuthVo);
        return baseMapper.insertCheck(roleAuthVo);
    }
}